﻿using System.ComponentModel.DataAnnotations.Schema;

namespace EntityModels.Entities
{
    public class GeneratedValueEntity
    {
        public int Id { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public DateTime Inserted { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.Computed)]
        public DateTimeOffset InsertedOffset { get; set; }
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public string Text { get; set; }

        [NotMapped]
        public string SummryInApp => $"Record id is {Id} and inserted on {InsertedOffset} by app code";
        public string SummryInDatabase { get; set; }

    }
}
